package com.itheima.day05.myfactorial.test2;

public class Test {
    public static void main(String[] args) {
        int avg = getAvg(100);
        System.out.println(avg);
    }

    public static int getAvg(int i) {
        if(i == 1){
            return i;
        }else{
            return i + getAvg(i - 1);
        }
    }
}
